//
//  TestTabViewWC.m
//  sandbox
//
//  Created by 杨岑 on 3/24/15.
//  Copyright (c) 2015 杨岑. All rights reserved.
//

#import "TestTabViewWC.h"

@interface TestTabViewWC ()
@property (weak) IBOutlet NSTabView *tabView;
@property (strong) IBOutlet NSViewController *testViewVC;

@end

@implementation TestTabViewWC

- (void)awakeFromNib
{
    NSTabViewItem* ti = self.tabView.tabViewItems[0];
    
    [ti setImage:[NSImage imageNamed:NSImageNameActionTemplate]];
}

- (IBAction)test_click:(id)sender {
    NSTabViewItem* ti = [[NSTabViewItem alloc] initWithIdentifier:@"New Tab"];
    ti.label = ti.identifier;
    ti.view = self.testViewVC.view;
    [self.tabView addTabViewItem:ti];
}

@end
